//
//  NSString+YYExtension.h
//  NNHealthMall
//
//  Created by 蓓蕾 on 2021/7/17.
//  Copyright © 2021 YY. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface NSString (YYExtension)

/** 检查字符串是否为空 YES:为空  NO:不为空 */
+ (BOOL)isBlankString:(NSString *)string;
/** 检查字符串是否为空 YES:为空  NO:不为空 */
- (BOOL)isBlankString;

// 获取文本宽度
- (CGFloat)yy_maxWidthWithFont:(UIFont*)font Height:(CGFloat)height Alignment:(NSTextAlignment)alignment LinebreakMode:(NSLineBreakMode)linebreakMode LineSpace:(CGFloat)lineSpace;

- (CGFloat)yy_maxWidthWithFont:(UIFont*)font Height:(CGFloat)height;

- (CGFloat)yy_maxHeightWithFont:(UIFont*)font Width:(CGFloat)width;
/// 获取文本高度

/// 获取文本高度
/// @param font 字体
/// @param width 宽度
/// @param alignment 对齐方式
/// @param linebreakMode 文本的显示方式
/// @param lineSpace 行高
- (CGFloat)yy_maxHeightWithFont:(UIFont*)font Width:(CGFloat)width Alignment:(NSTextAlignment)alignment LinebreakMode:(NSLineBreakMode)linebreakMode LineSpace:(CGFloat)lineSpace;

/// 获取文本高度
/// @param font 字体
/// @param width 字符串宽度
/// @param paragraphStyle 文本段落排版格式
- (CGFloat)yy_maxHeightWithFont:(UIFont*)font Width:(CGFloat)width ParagraphStyle:(NSParagraphStyle *)paragraphStyle;

/// 文字转图片
- (UIImage*)yy_textBecomeImageWithSize:(CGSize)size BackgroundColor:(UIColor*)color TextAttributes:(NSDictionary*)attributes;

/// 复制数据至剪切板
- (void)yy_pasteboard;

@end

NS_ASSUME_NONNULL_END
